package com.zmj.framework.request;

import com.zmj.demo.pojo.entity.req.PageInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Zhang Qingsong
 * @date 2021/9/6
 */
@Builder(builderMethodName = "PageRequest")
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Data
public class PageRequest implements Serializable {

    @NotNull
    @ApiModelProperty(value = "当前页",example="1")
    Integer current = 1;

    @NotNull
    @ApiModelProperty(value = "每页的数量",example = "10")
    Integer size = 10;
    
    @NotNull
    Integer pageNum = 1;
    @NotNull
    Integer pageSize = 10;
    Integer pageIndex = 1;

    private String order;

    private String orderBy;

    private Map<String, Object> param = new HashMap<>();

    private PageInfo pageInfo = new PageInfo();
}
